Horizontal line test

In mathematics, the horizontal line test is a test used to determine if a function is injective[1] and/or surjective. The lines used for the test are parallel to the x axis.

Consider a function f : X → Y with its corresponding graph as a subset of the Cartesian product X x Y. Consider the horizontal lines in X x Y :\{(x,y_0) \in X \times Y: y_0 \text{ is constant}\} = X \times \{y_0\} .


Passes the test (injective)


Fail the test (not injective)

This test is also used to determine whether or not the inverse relation of a function is itself a function.

See also

References

  1. ^ Stewart, James (2008). Calculus: Early Transcendentals (6th ed.). Brooks/Cole. ISBN 0-495-01166-5.